﻿using System;
using System.Reflection;
using FluentNHibernate.Conventions;

namespace good1.Data.NHibernateMaps.Conventions
{
    public class CustomForeignKeyConvention : ForeignKeyConvention
    {
        protected override string GetKeyName(PropertyInfo property, Type type)
        {
            if (property == null)
                return type.Name + "Id";
            return property.Name + "Id";
        }
    }
}
